import axiosInstance from "../utils/axios.ts";
import type {CompanyDTO, CompanyVO, MyResponse} from "../types";


export const insertCompany = (company: CompanyVO) => {
  return axiosInstance.post<MyResponse<boolean>>("/company/save", company)
}
export const getCompanies = axiosInstance.post<MyResponse<CompanyDTO>>("company/getList")

export const deleteCompany = (id: number) => {
  return axiosInstance.delete<MyResponse<boolean>>("/company/delete", {
    params: {
      id: id
    }
  })
}